package com.hyl;

import com.hyl.entity.SysUser;
import com.hyl.service.SysRoleService;
import com.hyl.service.SysUserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.Arrays;

/**
 * @Description TODO
 * @Author hyl
 * @Date 2023/5/5 10:28
 **/
public class TestSpring {
	public static void main(String[] args) {
		ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext-mybatis.xml");
		System.out.println(Arrays.toString(ctx.getBeanDefinitionNames()));

		SysRoleService service = (SysRoleService) ctx.getBean("sysRoleService");
		service.findByParams(null,null, 0, 5);
		service.findAll();
//	    SysUser user =  userService.findUserAndRoleById(1);
//		System.out.println(user.getRealName());
	}
}
